<template>
  
  <div class="danhang">
    <el-container>
      <el-header>Header</el-header>
      <el-container>
        <el-aside width="200px">
          <DAOHANG></DAOHANG>
        </el-aside>
        <el-main width="calc(100%-200px)">
          <router-view />
          <!-- 路由指向到这里 -->
        </el-main>
      </el-container>
    </el-container>
    
  </div>
</template>

<script>
import DAOHANG from "./导航.vue";

export default {
  name: "BUJU",
  data() {
    return {};
  },
  components: {
    DAOHANG,
  },
  mounted() {
    this.dataFn();
  },
  methods: {
    dataFn() {
      this.$axios({
        method: "get",
        url: "./json/shuju.json",
      })
        .then((res) => {
          this.$store.commit("chuanshu", res.data.mapdata);
          // console.log(res.data.mapdata)
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
};
</script>

<style lang="scss" scoped>
.el-header {
  background-color: rgb(34, 45, 45);
  color: white;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  color: #333;
  text-align: center;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  height: 750px;
  float: right;
  overflow: hidden;
}
</style>